package spe.model.spem;

import java.beans.PropertyChangeListener;
import java.util.Map;

import org.eclipse.jface.resource.ImageDescriptor;

/**
 * Author Dao Anh Vu 
 * An semantic element is all element that will be saved in our document 
 */

public interface SPEMElement extends PropertyChangeListener 
{
	public void initialize();
	
	public String getElementId();
	public void setElementId(String id);
	
	public void addPropertyChangeListener(PropertyChangeListener listener);
	public void removePropertyChangeListener(PropertyChangeListener listener);
	public void firePropertyChange(String propertyName, Object oldValue, Object newValue);
	
	public String getId();
	public void setId(String id);
	
	public String getNamePrefix();
	public void setNamePrefix(String namePrefix);
	
	public ImageDescriptor getIconDescriptor();
	public void setIconDescriptor(ImageDescriptor image);
	public SPEMFactory getFactory();
	public void setFactory(SPEMFactory factory);
	
	public void setName(String newName);
	public String getName();
	public boolean isNameMandatory();
	
	public SPEMElement getParent();
	public void setParent(SPEMElement p);
	
	public Map<String, Object> getAttributes();
	
	//these methods are used to manage live element
	public void register();
	public void unregister();
}
